package com.budwk.app.waterquality.enums;

import com.budwk.app.waterquality.vo.ParamProblemVo;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

@Getter
@AllArgsConstructor
public enum WaterSectionDetailEnum {
    PB("PB","铅", "mg/L"),
    CN("CN","氰化物", "mg/L"),
    VLPH("VLPH","挥发酚", "mg/L"),
    OIL("OIL","石油类", "mg/L"),
    LAS("LAS","阴离子表面活性剂", "mg/L"),
    S2("S2","硫化物", "mg/L"),
    FCM("FCM","粪大肠菌群", "个/L"),
    SO4("SO4","硫酸盐", "mg/L"),
    CL("CL","氯化物", "mg/L"),
    NO3("NO3","硝酸盐氮", "mg/L"),
    FE("FE","铁", "mg/L"),
    MN("MN","锰", "mg/L"),
    CHLA("CHLA","叶绿素a", "mg/L"),
    CLARITY("CLARITY","透明度", "m"),
    SS("SS","悬浮物", "mg/L"),
    TDS("TDS","溶解性总固体", "mg/L"),
    THRD("THRD","总硬度", "mg/L"),
    TCG("TCG","总大肠菌群", "个/mL"),


    ;

    private  String field; // 字段名称
    private  String name; // 字段单位
    private  String fieldUnit; // 字段单位

    public static List<ParamProblemVo> buildDefaults() {
        List<ParamProblemVo> paramProblemVos = new ArrayList<>();
        for (WaterSectionDetailEnum e : values()) {
            ParamProblemVo p = new ParamProblemVo();
            p.setField(e.getField()).setFieldUnit(e.getFieldUnit()).setName(e.getName());
            paramProblemVos.add(p);
        }
        return paramProblemVos;
    }
}
